import request from '@/config/axios'

export interface CoursePaintVO {
  id: number
  workTaskNumber: string
  productNumber: string
  productName: string
  modelSpecification: string
  orderQuantity: number
  code: string
  partNumber: string
  partName: string
  drawingNumber: string
  partSpecification: string
  material: string
  specification: string
  planBeginDate: string
  planEndDate: string
  netSizeLength: number
  netSizeWidth: number
  cuttingSizeLength: number
  cuttingSizeWidth: number
  planQuantity: number
  reportQuantity: number
  completeQuantity: number
  differenceQuantity: number
  productionTeam: string
  deviceName: string
  deviceCode: string
  operator: string
  jobNumber: string
  dictStatus: number
  processPrice: number
  creatorName: string
}

// 查询生产管理-过程管理-油漆管理列表
export const getCoursePaintPage = async (params) => {
  return await request.get({ url: `/produce/course-paint/page`, params })
}

// 查询生产管理-过程管理-油漆管理详情
export const getCoursePaint = async (id: number) => {
  return await request.get({ url: `/produce/course-paint/getDetail?id=` + id })
}

// 新增生产管理-过程管理-油漆管理
export const createCoursePaint = async (data: CoursePaintVO) => {
  return await request.post({ url: `/produce/course-paint/create`, data })
}

// 修改生产管理-过程管理-油漆管理
export const updateCoursePaint = async (data: CoursePaintVO) => {
  return await request.put({ url: `/produce/course-paint/update`, data })
}

// 删除生产管理-过程管理-油漆管理
export const deleteCoursePaint = async (id: number) => {
  return await request.delete({ url: `/produce/course-paint/delete?id=` + id })
}

// 导出生产管理-过程管理-油漆管理 Excel
export const exportCoursePaint = async (params) => {
  return await request.download({ url: `/produce/course-paint/export-excel`, params })
}

// 生产管理-过程管理-油漆管理指派
export const assignCoursePaint = async (data) => {
  return await request.put({ url: `/produce/course-paint/assign`, data })
}